<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="changeText()">change</button>
    <div id="span"></div>
    <script type="module">
      
        /*
      1. 数据绑定
      2. 表格绘制。
      3. 添加行
      4. 添加列/删除列
      5. 显示/隐藏列
      6. 列宽调整
      8. 树形数据
      9. 展开/收缩树
      10. 拖拽行
      */
        import { h, patch, Qinput,useObserver } from "../demo/h.js";
        const obj  = {
            user: "henq",
            live: ["台球", "自行车", "旅行"],
            list: [{ name: "汽车", id: 1 }, { name: "卡尺", id: 2 }, { name: "吉祥", id: 3 }],
        }
        let text=h("h1",[h("span","姓名:"),h(obj.user)]);
        const weakMap=new WeakMap();
        span.append(text);
        let live=h("ul",
            obj.live.map(s=>{
                return h("li",s)
            })
        )
        weakMap.set(text)
        span.append(live);

        let list=h("ul",{},
            obj.list.map(s=>{
                return h("li",{},[h("span",{className:"id"},s.id),h("span",{className:"name"},s.name)])
            })
        )
        span.append(list);
        // text._render(5)
        function changeText(){
            
        }
        let html=`
        <h1>姓名:{name}</h1>
          <h2>爱好:{live}</h2>

        `
        console.warn("live",live);
    </script>
</body>
</html>